import javax.swing.*;
import java.awt.*;

//野怪
public class WildMonster extends JFrame {
    static int windowWidth = 1198;
    static int windowHeight = 891;
    WildMonster()
    {

        setSize(windowWidth, windowHeight);

        // 窗口居中
        setLocationRelativeTo(null);

        // 关闭事件
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        // 用户不能调整窗口大小
        setResizable(true);

        // 标题
        setTitle("A Star");

        // 窗口可见
        setVisible(true);

        while (true)
            paint1(getGraphics());
    }


    void paint1(Graphics graphics) {
        new Point(100, 100);
        int[] xPoints = new int[]{100, 200, 400, 500};
        int[] yPoints = new int[]{100, 300, 200, 500};
        graphics.fillPolygon(xPoints, yPoints, 4);
    }


    void move() {

    }


    void attack(Graphics graphics) {

    }

    public static void main(String[] args) {
        new WildMonster();
    }
}
